//
//  PaiPriceInfoView.m
//  PPDL
//
//  Created by 王洋 on 2019/9/12.
//  Copyright © 2019 王洋. All rights reserved.
//

#import "PaiPriceInfoView.h"

@implementation PaiPriceInfoView

- (void)awakeFromNib {
    [super awakeFromNib];
    
    if (IS_IPHONE_5) {
        self.itemNameWidth.constant = 100;
    }
    
    if (IS_IPHONE_6) {
        self.itemNameWidth.constant = 120;
    }
}

- (void)fillHeaderWithPriceModel:(UserPaiPriceModel *)priceModel AndInfoModel:(DetailGoodInfoModel *)infoModel {

    [self.itemUserIcon sd_setImageWithURL:[NSURL URLWithString:priceModel.userIcon] placeholderImage:[UIImage imageNamed:@"placeholder_rect"] options:SDWebImageLowPriority];
    
    self.itemUserName.text = [NSString stringWithFormat:@"%@", priceModel.userName];
    self.itemCurrentPrice.text = [NSString stringWithFormat:@"¥%@",[Utilities changeDoubleToString:priceModel.price]];
    
    self.itemAddPriceRange.text = [NSString stringWithFormat:@"¥%@", [Utilities changeDoubleToString:infoModel.itemAddPriceRange]];
}
@end
